package com.sc.nft.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sc.nft.entity.MerchantPledgeTaskIncomeConf;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sc.nft.entity.vo.IncomeRecordPageVO;
import com.sc.nft.entity.vo.merchantPledgeTask.AdminIncomeConfVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 商户质押任务收益配置表(sc_merchant_pledge_task_income_conf)数据Mapper
 *
 * @author Sun
 * @since 2023-08-24 16:16:49
 * @description 由 Mybatisplus Code Generator 创建
*/
@Mapper
public interface MerchantPledgeTaskIncomeConfMapper extends BaseMapper<MerchantPledgeTaskIncomeConf> {

    /**
     * 获取直推收益列表和奖励详情
     * @param merchantPledgeTaskId
     * @param id
     * @return
     */
    List<AdminIncomeConfVO> getDirectIncomeListAndRewardsDetailsByTaskId(@Param("merchantPledgeTaskId") Long merchantPledgeTaskId,@Param("id") Long id);
    /**
     * 获取间推收益列表和奖励详情
     * @param merchantPledgeTaskId
     * @param id
     * @return
     */
    List<AdminIncomeConfVO> getExtrapolatedIncomeListAndRewardsDetailsByTaskId(@Param("merchantPledgeTaskId") Long merchantPledgeTaskId,@Param("id") Long id);

    /**
     * 获取收益记录
     * @param page
     * @param userId
     * @return
     */
    Page<IncomeRecordPageVO> incomeRecordPage(Page page,@Param("userId") Long userId);

}
